Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulse pass manager bugfix #11961

Merged

Conversation

nkanazawa1989
Copy link
Contributor

Summary

Pulse pass manager skeleton was added by #11743. This PR fixes bugs.

Details and comments

1: Pass must be hashable.

Due to the original implementation of Qiskit PassManager, passes with the identical hash are considered as idempotent and execution of the duplicated (same hash) passes are omitted by design. There was long discussion in #10127 but we decided to remain this behavior.

if self not in state.workflow_status.completed_passes:
ret = self.run(passmanager_ir)
run_state = RunState.SUCCESS
else:
run_state = RunState.SKIP

The base passes introduced in #11743 didn't implement hash, and crashes the pass manager since a pass instance cannot be added to the completed pass set.

2: Bug fix of schedule block -> IR conversion.

A small test added in #11743 was unintentionally passed due to

if not self._tasks and not kwargs and callback is None:
return in_programs

Although the pass and conversion logic had bugs, round trip test unintentionally succeeded because nothing was really executed (pass manager run just returned input object as-is, since no pass was added to the flow controller).

@nkanazawa1989 nkanazawa1989 requested review from eggerdj, wshanks and a team as code owners March 6, 2024 19:13
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core
  • @nkanazawa1989

@nkanazawa1989 nkanazawa1989 requested review from TsafrirA and removed request for a team, wshanks and eggerdj March 6, 2024 19:13
@nkanazawa1989 nkanazawa1989 added experimental Experimental feature without API stability guarantee mod: pulse Related to the Pulse module labels Mar 6, 2024
@nkanazawa1989 nkanazawa1989 linked an issue Mar 6, 2024 that may be closed by this pull request
9 tasks
Copy link
Collaborator

@TsafrirA TsafrirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
You can merge this first and I'll fix #11951.

@nkanazawa1989 nkanazawa1989 merged commit 646e7ef into Qiskit:feature/pulse-ir Mar 7, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Experimental feature without API stability guarantee mod: pulse Related to the Pulse module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pulse Compiler and IR
3 participants